// mock.js
// 引入mockjs
const Mock = require('mockjs')
//点击树组成的数据
const prodData = function () {
    var rtnMsg={
        from:{
            maxQty: "test001",
            fqcNgqty: "test001",
            prdYield: "test001",
            cusPrdName: "test001",
            propMtrlProdId: "test001",
            PropMtrlProdDesc: "test001",
            PropPrdVar: "test001",
            PropPrdName: "test001",
            size: "test001",
            PropCusId: "test001",
            prodThick: "test001",
            cusProdCode: "test001",
            proRouteCode: "test001",
            proRouteName: "test001",
            proRouteVer: "test001",
            projectCode: "test001",
            fqcQty: "test001",
            validFlg: "test001",
            fqcReturnSta: "test001",
            fqcReturnStaVer: "test001",
        },
        mtrlDataSource :[
            {modalMtrlqty:'1',modalMtrlId: 'John Brown', mtrlVar: 32, rootMtrlVar: 'New York No. 1 Lake Park', statCode: 'developer',},
            {modalMtrlqty:'1',modalMtrlId: 'Jim Green', mtrlVar: 42, rootMtrlVar: 'London No. 1 Lake Park', statCode: 'developer',},
            {modalMtrlqty:'1',modalMtrlId: 'Joe Black', mtrlVar: 32, rootMtrlVar: 'Sidney No. 1 Lake Park', statCode: 'developer',},
            {modalMtrlqty:'1',modalMtrlId: 'Disabled User', mtrlVar: 99, rootMtrlVar: 'Sidney No. 1 Lake Park', statCode: 'developer',},
            {modalMtrlqty:'1',modalMtrlId: 'John Brown', mtrlVar: 32, rootMtrlVar: 'New York No. 1 Lake Park', statCode: 'developer',},
            {modalMtrlqty:'1',modalMtrlId: 'Jim Green', mtrlVar: 42, rootMtrlVar: 'London No. 1 Lake Park', statCode: 'developer',},
            {modalMtrlqty:'1',modalMtrlId: 'Joe Black', mtrlVar: 32, rootMtrlVar: 'Sidney No. 1 Lake Park', statCode: 'developer',},
            {modalMtrlqty:'1',modalMtrlId: 'Disabled User', mtrlVar: 99, rootMtrlVar: 'Sidney No. 1 Lake Park', statCode: 'developer',},
            {modalMtrlqty:'1',modalMtrlId: 'John Brown', mtrlVar: 32, rootMtrlVar: 'New York No. 1 Lake Park', statCode: 'developer',},
            {modalMtrlqty:'1',modalMtrlId: 'Jim Green', mtrlVar: 42, rootMtrlVar: 'London No. 1 Lake Park', statCode: 'developer',},
            {modalMtrlqty:'1',modalMtrlId: 'Joe Black', mtrlVar: 32, rootMtrlVar: 'Sidney No. 1 Lake Park', statCode: 'developer',},
            {modalMtrlqty:'1',modalMtrlId: 'Disabled User', mtrlVar: 99, rootMtrlVar: 'Sidney No. 1 Lake Park', statCode: 'developer',},
            {modalMtrlqty:'1',modalMtrlId: 'John Brown', mtrlVar: 32, rootMtrlVar: 'New York No. 1 Lake Park', statCode: 'developer',},
            {modalMtrlqty:'1',modalMtrlId: 'Jim Green', mtrlVar: 42, rootMtrlVar: 'London No. 1 Lake Park', statCode: 'developer',},
            {modalMtrlqty:'1',modalMtrlId: 'Joe Black', mtrlVar: 32, rootMtrlVar: 'Sidney No. 1 Lake Park', statCode: 'developer',},
            {modalMtrlqty:'1',modalMtrlId: 'Disabled User', mtrlVar: 99, rootMtrlVar: 'Sidney No. 1 Lake Park', statCode: 'developer',},
        ],
        gradeDataSource : [{grade: 'John Brown', max: 32, min: ['nice', 'developer'],},
            {grade: 'Jim Green', max: 42, min: ['loser'],},
            {grade: 'Joe Black', max: 32, min: ['cool', 'teacher'],},
            {grade: 'Disabled User', max: 99, min: ['nice', 'developer'],},
            {grade: 'John Brown', max: 32, min: ['nice', 'developer'],},
            {grade: 'Jim Green', max: 42, min: ['loser'],},
            {grade: 'Joe Black', max: 32, min: ['cool', 'teacher'],},
            {grade: 'Disabled User', max: 99, min: ['nice', 'developer'],},
            {grade: 'John Brown', max: 32, min: ['nice', 'developer'],},
            {grade: 'Jim Green', max: 42, min: ['loser'],},
            {grade: 'Joe Black', max: 32, min: ['cool', 'teacher'],},
            {grade: 'Disabled User', max: 99, min: ['nice', 'developer'],},
            {grade: 'John Brown', max: 32, min: ['nice', 'developer'],},
            {grade: 'Jim Green', max: 42, min: ['loser'],},
            {grade: 'Joe Black', max: 32, min: ['cool', 'teacher'],},
            {grade: 'Disabled User', max: 99, min: ['nice', 'developer'],},]
    };
    return rtnMsg;
}
// 请求该url，模拟6400点击树时触发的方法
Mock.mock('/api/6400/getMsg', prodData)

//点击查询时的数据
const queryData = function () {
    var rtnMsg={
        children:[
            { title: 'test001', key: '0-0-1', scopedSlots: { icon: 'custom' } },
            { title: 'test002', key: '0-0-2', scopedSlots: { icon: 'custom' } },
            { title: 'test003', key: '0-0-3', scopedSlots: { icon: 'custom' } },
            { title: 'test004', key: '0-0-4', scopedSlots: { icon: 'custom' } },
            { title: 'test005', key: '0-0-5', scopedSlots: { icon: 'custom' } },
            { title: 'test006', key: '0-0-6', scopedSlots: { icon: 'custom' } },
            { title: 'test007', key: '0-0-7', scopedSlots: { icon: 'custom' } },
            { title: 'test008', key: '0-0-8', scopedSlots: { icon: 'custom' } },
            { title: 'test009', key: '0-0-9', scopedSlots: { icon: 'custom' } },
            { title: 'test009', key: '0-0-10', scopedSlots: { icon: 'custom' } },
            { title: 'test001', key: '0-0-11', scopedSlots: { icon: 'custom' } },
            { title: 'test002', key: '0-0-12', scopedSlots: { icon: 'custom' } },
            { title: 'test003', key: '0-0-13', scopedSlots: { icon: 'custom' } },
            { title: 'test004', key: '0-0-14', scopedSlots: { icon: 'custom' } },
            { title: 'test005', key: '0-0-15', scopedSlots: { icon: 'custom' } },
            { title: 'test006', key: '0-0-16', scopedSlots: { icon: 'custom' } },
            { title: 'test007', key: '0-0-17', scopedSlots: { icon: 'custom' } },
            { title: 'test008', key: '0-0-18', scopedSlots: { icon: 'custom' } },
            { title: 'test009', key: '0-0-19', scopedSlots: { icon: 'custom' } },
            { title: 'test009', key: '0-0-20', scopedSlots: { icon: 'custom' } },
            { title: 'test001', key: '0-0-21', scopedSlots: { icon: 'custom' } },
            { title: 'test002', key: '0-0-22', scopedSlots: { icon: 'custom' } },
            { title: 'test003', key: '0-0-23', scopedSlots: { icon: 'custom' } },
            { title: 'test004', key: '0-0-24', scopedSlots: { icon: 'custom' } },
            { title: 'test005', key: '0-0-25', scopedSlots: { icon: 'custom' } },
            { title: 'test006', key: '0-0-26', scopedSlots: { icon: 'custom' } },
            { title: 'test007', key: '0-0-27', scopedSlots: { icon: 'custom' } },
            { title: 'test008', key: '0-0-28', scopedSlots: { icon: 'custom' } },
            { title: 'test009', key: '0-0-29', scopedSlots: { icon: 'custom' } },
        ]
    };
    return rtnMsg;
}
Mock.mock('/api/6400/query', queryData)